import service from '@/utils/request'

// @Tags Garage
// @Summary 创建garage表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Garage true "创建garage表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /garages/createGarage [post]
export const createGarage = (data) => {
  return service({
    url: '/garages/createGarage',
    method: 'post',
    data
  })
}

// @Tags Garage
// @Summary 删除garage表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Garage true "删除garage表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /garages/deleteGarage [delete]
export const deleteGarage = (data) => {
  return service({
    url: '/garages/deleteGarage',
    method: 'delete',
    data
  })
}

// @Tags Garage
// @Summary 批量删除garage表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除garage表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /garages/deleteGarage [delete]
export const deleteGarageByIds = (data) => {
  return service({
    url: '/garages/deleteGarageByIds',
    method: 'delete',
    data
  })
}

// @Tags Garage
// @Summary 更新garage表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Garage true "更新garage表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /garages/updateGarage [put]
export const updateGarage = (data) => {
  return service({
    url: '/garages/updateGarage',
    method: 'put',
    data
  })
}

// @Tags Garage
// @Summary 用id查询garage表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Garage true "用id查询garage表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /garages/findGarage [get]
export const findGarage = (params) => {
  return service({
    url: '/garages/findGarage',
    method: 'get',
    params
  })
}

// @Tags Garage
// @Summary 分页获取garage表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取garage表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /garages/getGarageList [get]
export const getGarageList = (params) => {
  return service({
    url: '/garages/getGarageList',
    method: 'get',
    params
  })
}
